VERSION 0.6
all:
    BUILD +test

fetch:
    FROM alpine:3.10
    RUN apk add curl
    COPY fetch.sh /bin/fetch
    CMD ["/bin/fetch"]

test:
    LOCALLY
    WITH DOCKER \
            --compose docker-compose.yml \
            --service webserver \
            --load fetch:latest=+fetch
        RUN docker-compose up --exit-code-from fetch fetch | grep 'Hello World'
    END
